<?php
/*
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return['basic']=$this->plugin_setting('basic');
$return['ischecklogin']=cfc('core')->checklogin('','',true);
$this->model('member')->upmember();
if($_RQ['op']=='main'){
	set_html('title','辩证建议');
	$member=model('core/member')->detail($_SESSION['uid'],array('credit1','credit2','credit3','credit4','credit5','credit6','mobile','groupid','avatar','nickname'));
	if(!$member){
		//exi('找不到会员信息！','error');
	}
	$this->model('model')->checklogin();	
	$user=pdo_get('jy_aixiaoyi_member',array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
	//VIP时间：
	$user['vipstatus']=$user['viptime']>time()?1:2;
	$user['viptime']=date('Y/m/d',$user['viptime']);
	$member['avatar']=tomedia($member['avatar']);
	$return['member']=$member;
	$return['post']=array('jy'=>'');
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	//$postdata['image']='https://doctor-studio.oss-cn-shanghai.aliyuncs.com/images/168931652301173.png';
	//$postdata['image2']='https://doctor-studio.oss-cn-shanghai.aliyuncs.com/shezhen/168931653354721.png';
	if(!$postdata['image'] || !$postdata['image2']){
		exi('请上传图片','error');
	}
	$data =array(
		'image'=>$postdata['image'],
		'image2'=>$postdata['image2'],
	);
	$this->model('sheyu')->getbian($data,'TongueFaceAnalysis');
	exi('提交成功！','','/bianlog/');
}